/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package co.com.entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author 841756
 */
@Entity
@Table(name = "tblfactoresprovision")
@NamedQueries({
    @NamedQuery(name = "Tblfactoresprovision.findAll", query = "SELECT t FROM Tblfactoresprovision t"),
    @NamedQuery(name = "Tblfactoresprovision.findByCodFactor", query = "SELECT t FROM Tblfactoresprovision t WHERE t.codFactor = :codFactor"),
    @NamedQuery(name = "Tblfactoresprovision.findByAnoFiscal", query = "SELECT t FROM Tblfactoresprovision t WHERE t.anoFiscal = :anoFiscal"),
    @NamedQuery(name = "Tblfactoresprovision.findByTipoEmpleado", query = "SELECT t FROM Tblfactoresprovision t WHERE t.tipoEmpleado = :tipoEmpleado"),
    @NamedQuery(name = "Tblfactoresprovision.findBySalarioMin", query = "SELECT t FROM Tblfactoresprovision t WHERE t.salarioMin = :salarioMin"),
    @NamedQuery(name = "Tblfactoresprovision.findByAuxTransporte", query = "SELECT t FROM Tblfactoresprovision t WHERE t.auxTransporte = :auxTransporte"),
    @NamedQuery(name = "Tblfactoresprovision.findByBonificacionNavidad", query = "SELECT t FROM Tblfactoresprovision t WHERE t.bonificacionNavidad = :bonificacionNavidad"),
    @NamedQuery(name = "Tblfactoresprovision.findByCesantias", query = "SELECT t FROM Tblfactoresprovision t WHERE t.cesantias = :cesantias"),
    @NamedQuery(name = "Tblfactoresprovision.findByIntCesantias", query = "SELECT t FROM Tblfactoresprovision t WHERE t.intCesantias = :intCesantias"),
    @NamedQuery(name = "Tblfactoresprovision.findByPrimaLegal", query = "SELECT t FROM Tblfactoresprovision t WHERE t.primaLegal = :primaLegal"),
    @NamedQuery(name = "Tblfactoresprovision.findByVacaciones", query = "SELECT t FROM Tblfactoresprovision t WHERE t.vacaciones = :vacaciones"),
    @NamedQuery(name = "Tblfactoresprovision.findByAportePensiones", query = "SELECT t FROM Tblfactoresprovision t WHERE t.aportePensiones = :aportePensiones"),
    @NamedQuery(name = "Tblfactoresprovision.findByAporteSalud", query = "SELECT t FROM Tblfactoresprovision t WHERE t.aporteSalud = :aporteSalud"),
    @NamedQuery(name = "Tblfactoresprovision.findByAporteSena", query = "SELECT t FROM Tblfactoresprovision t WHERE t.aporteSena = :aporteSena"),
    @NamedQuery(name = "Tblfactoresprovision.findByAporteIcbf", query = "SELECT t FROM Tblfactoresprovision t WHERE t.aporteIcbf = :aporteIcbf"),
    @NamedQuery(name = "Tblfactoresprovision.findByAporteCajacomp", query = "SELECT t FROM Tblfactoresprovision t WHERE t.aporteCajacomp = :aporteCajacomp")})
public class Tblfactoresprovision implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 5)
    @Column(name = "cod_factor")
    private String codFactor;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ano_fiscal")
    private int anoFiscal;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "tipo_empleado")
    private String tipoEmpleado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "salario_min")
    private double salarioMin;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aux_transporte")
    private double auxTransporte;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bonificacion_navidad")
    private long bonificacionNavidad;
    @Basic(optional = false)
    @NotNull
    @Column(name = "cesantias")
    private long cesantias;
    @Basic(optional = false)
    @NotNull
    @Column(name = "int_cesantias")
    private long intCesantias;
    @Basic(optional = false)
    @NotNull
    @Column(name = "prima_legal")
    private long primaLegal;
    @Basic(optional = false)
    @NotNull
    @Column(name = "vacaciones")
    private long vacaciones;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aporte_pensiones")
    private long aportePensiones;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aporte_salud")
    private long aporteSalud;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aporte_sena")
    private long aporteSena;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aporte_icbf")
    private long aporteIcbf;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aporte_cajacomp")
    private long aporteCajacomp;
    @JoinColumn(name = "cod_compania", referencedColumnName = "cod_compania")
    @ManyToOne(optional = false)
    private Tblcompania codCompania;
    @JoinColumn(name = "id_estado", referencedColumnName = "id_estado")
    @ManyToOne(optional = false)
    private TblEstado idEstado;

    public Tblfactoresprovision() {
    }

    public Tblfactoresprovision(String codFactor) {
        this.codFactor = codFactor;
    }

    public Tblfactoresprovision(String codFactor, int anoFiscal, String tipoEmpleado, double salarioMin, double auxTransporte, long bonificacionNavidad, long cesantias, long intCesantias, long primaLegal, long vacaciones, long aportePensiones, long aporteSalud, long aporteSena, long aporteIcbf, long aporteCajacomp) {
        this.codFactor = codFactor;
        this.anoFiscal = anoFiscal;
        this.tipoEmpleado = tipoEmpleado;
        this.salarioMin = salarioMin;
        this.auxTransporte = auxTransporte;
        this.bonificacionNavidad = bonificacionNavidad;
        this.cesantias = cesantias;
        this.intCesantias = intCesantias;
        this.primaLegal = primaLegal;
        this.vacaciones = vacaciones;
        this.aportePensiones = aportePensiones;
        this.aporteSalud = aporteSalud;
        this.aporteSena = aporteSena;
        this.aporteIcbf = aporteIcbf;
        this.aporteCajacomp = aporteCajacomp;
    }

    public String getCodFactor() {
        return codFactor;
    }

    public void setCodFactor(String codFactor) {
        this.codFactor = codFactor;
    }

    public int getAnoFiscal() {
        return anoFiscal;
    }

    public void setAnoFiscal(int anoFiscal) {
        this.anoFiscal = anoFiscal;
    }

    public String getTipoEmpleado() {
        return tipoEmpleado;
    }

    public void setTipoEmpleado(String tipoEmpleado) {
        this.tipoEmpleado = tipoEmpleado;
    }

    public double getSalarioMin() {
        return salarioMin;
    }

    public void setSalarioMin(double salarioMin) {
        this.salarioMin = salarioMin;
    }

    public double getAuxTransporte() {
        return auxTransporte;
    }

    public void setAuxTransporte(double auxTransporte) {
        this.auxTransporte = auxTransporte;
    }

    public long getBonificacionNavidad() {
        return bonificacionNavidad;
    }

    public void setBonificacionNavidad(long bonificacionNavidad) {
        this.bonificacionNavidad = bonificacionNavidad;
    }

    public long getCesantias() {
        return cesantias;
    }

    public void setCesantias(long cesantias) {
        this.cesantias = cesantias;
    }

    public long getIntCesantias() {
        return intCesantias;
    }

    public void setIntCesantias(long intCesantias) {
        this.intCesantias = intCesantias;
    }

    public long getPrimaLegal() {
        return primaLegal;
    }

    public void setPrimaLegal(long primaLegal) {
        this.primaLegal = primaLegal;
    }

    public long getVacaciones() {
        return vacaciones;
    }

    public void setVacaciones(long vacaciones) {
        this.vacaciones = vacaciones;
    }

    public long getAportePensiones() {
        return aportePensiones;
    }

    public void setAportePensiones(long aportePensiones) {
        this.aportePensiones = aportePensiones;
    }

    public long getAporteSalud() {
        return aporteSalud;
    }

    public void setAporteSalud(long aporteSalud) {
        this.aporteSalud = aporteSalud;
    }

    public long getAporteSena() {
        return aporteSena;
    }

    public void setAporteSena(long aporteSena) {
        this.aporteSena = aporteSena;
    }

    public long getAporteIcbf() {
        return aporteIcbf;
    }

    public void setAporteIcbf(long aporteIcbf) {
        this.aporteIcbf = aporteIcbf;
    }

    public long getAporteCajacomp() {
        return aporteCajacomp;
    }

    public void setAporteCajacomp(long aporteCajacomp) {
        this.aporteCajacomp = aporteCajacomp;
    }

    public Tblcompania getCodCompania() {
        return codCompania;
    }

    public void setCodCompania(Tblcompania codCompania) {
        this.codCompania = codCompania;
    }

    public TblEstado getIdEstado() {
        return idEstado;
    }

    public void setIdEstado(TblEstado idEstado) {
        this.idEstado = idEstado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codFactor != null ? codFactor.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tblfactoresprovision)) {
            return false;
        }
        Tblfactoresprovision other = (Tblfactoresprovision) object;
        if ((this.codFactor == null && other.codFactor != null) || (this.codFactor != null && !this.codFactor.equals(other.codFactor))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "" + codFactor + "";
    }
    
}
